If an error condition occurs, this routine returns an integer
value indicating the type of error. Possible return values are as
follows:
Return Description
0 Successful completion.
[EAGAIN] The system lacks the necessary resources to
initialize another condition variable, or
The system-imposed limit on the total number of
condition variables under execution by a single user
is exceeded.
[EBUSY] The implementation has detected an attempt to
reinitialize the object referenced by cond, a
previously initialized, but not yet destroyed
condition variable.
[EINVAL] The value specified by attr is not a valid attributes
object.
[ENOMEM] Insufficient memory exists to initialize the
condition variable.